<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>libspotify: Search subsystem</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">libspotify
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Search subsystem</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gabcd51c99a318b9f36dfe2948d8209bb1"><td class="memItemLeft" align="right" valign="top">typedef void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#gabcd51c99a318b9f36dfe2948d8209bb1">search_complete_cb</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *result, void *userdata)</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga2f64dfbcc1313e7d5179998cb28208d4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#ga2f64dfbcc1313e7d5179998cb28208d4">sp_search_create</a> (<a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *session, const char *query, int track_offset, int track_count, int album_offset, int album_count, int artist_offset, int artist_count, int playlist_offset, int playlist_count, <a class="el" href="group__session.html#ga99e8e9176ce40fff08a9be8b944edb09">sp_search_type</a> search_type, <a class="el" href="group__search.html#gabcd51c99a318b9f36dfe2948d8209bb1">search_complete_cb</a> *callback, void *userdata)</td></tr>
<tr class="memitem:ga70e8c404d8c7ce0bbef70c2b274417cd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#ga70e8c404d8c7ce0bbef70c2b274417cd">sp_search_is_loaded</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search)</td></tr>
<tr class="memitem:ga7cf655e37a823f952d30270d4fb60f10"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__error.html#gafd27986ce4cd9eeaeca8adda83c9eb6b">sp_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#ga7cf655e37a823f952d30270d4fb60f10">sp_search_error</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search)</td></tr>
<tr class="memitem:ga1dd18cf7b3b3b7f4bf6e92a2140378d0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#ga1dd18cf7b3b3b7f4bf6e92a2140378d0">sp_search_num_tracks</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search)</td></tr>
<tr class="memitem:gae9da7ca59ce0bbd73f7bcef4e15c4da8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#gae9da7ca59ce0bbd73f7bcef4e15c4da8">sp_search_track</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search, int index)</td></tr>
<tr class="memitem:ga0c456a6396c4c05fbc8677ea641ef1f7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#ga0c456a6396c4c05fbc8677ea641ef1f7">sp_search_num_albums</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search)</td></tr>
<tr class="memitem:ga4ba7723e70db0c6a4569c4bcd44f0e98"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga6fd3e5de729c429fef3ff18ece6dcfad">sp_album</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#ga4ba7723e70db0c6a4569c4bcd44f0e98">sp_search_album</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search, int index)</td></tr>
<tr class="memitem:gaa9f007f439d8241bf632f9abb8d926c9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#gaa9f007f439d8241bf632f9abb8d926c9">sp_search_num_playlists</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search)</td></tr>
<tr class="memitem:ga933cd5d5a0ccca9906082ca4549a4ed7"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#ga933cd5d5a0ccca9906082ca4549a4ed7">sp_search_playlist_name</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search, int index)</td></tr>
<tr class="memitem:ga0071a3d30f0f0c4e477bf923e9014ff5"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#ga0071a3d30f0f0c4e477bf923e9014ff5">sp_search_playlist_uri</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search, int index)</td></tr>
<tr class="memitem:gac4463fab4ea25e0a5d5079c959a1781c"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#gac4463fab4ea25e0a5d5079c959a1781c">sp_search_playlist_image_uri</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search, int index)</td></tr>
<tr class="memitem:gabd375a613c2dadecad8c13f8aca6f2d3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#gabd375a613c2dadecad8c13f8aca6f2d3">sp_search_num_artists</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search)</td></tr>
<tr class="memitem:ga79b3d532d5a20a3b2bf2a087eead7888"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga31764fbd69618c10be173c6c03d4c1bc">sp_artist</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#ga79b3d532d5a20a3b2bf2a087eead7888">sp_search_artist</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search, int index)</td></tr>
<tr class="memitem:ga127e9c2bf98e3602ecfc2926b9d242bf"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#ga127e9c2bf98e3602ecfc2926b9d242bf">sp_search_query</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search)</td></tr>
<tr class="memitem:ga8561c1da8b93ecdc8f2d325a9d19199b"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#ga8561c1da8b93ecdc8f2d325a9d19199b">sp_search_did_you_mean</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search)</td></tr>
<tr class="memitem:gab4e50582c517b4639fd1afd6fb011587"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#gab4e50582c517b4639fd1afd6fb011587">sp_search_total_tracks</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search)</td></tr>
<tr class="memitem:gaafd3b228adbc028937383d0d45730581"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#gaafd3b228adbc028937383d0d45730581">sp_search_total_albums</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search)</td></tr>
<tr class="memitem:ga305a4118625e0f70cfb14161a0112fd5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#ga305a4118625e0f70cfb14161a0112fd5">sp_search_total_artists</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search)</td></tr>
<tr class="memitem:ga2e286415a6ba8dbf85ea677906f2798c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#ga2e286415a6ba8dbf85ea677906f2798c">sp_search_total_playlists</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search)</td></tr>
<tr class="memitem:gaff6bc550425d8ab963d93d7ed2e15bb5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#gaff6bc550425d8ab963d93d7ed2e15bb5">sp_search_add_ref</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search)</td></tr>
<tr class="memitem:ga5a5bcc9cf18698774a099c3ce8cdab63"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__search.html#ga5a5bcc9cf18698774a099c3ce8cdab63">sp_search_release</a> (<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *search)</td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="gabcd51c99a318b9f36dfe2948d8209bb1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void <a class="el" href="group__search.html#gabcd51c99a318b9f36dfe2948d8209bb1">search_complete_cb</a>(<a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *result, void *userdata)</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The type of a callback used in <a class="el" href="group__search.html#ga2f64dfbcc1313e7d5179998cb28208d4">sp_search_create()</a></p>
<p>When this callback is called, the <a class="el" href="group__track.html#ga8b69cf193679c7e00031ae43e61c6a54">sp_track_is_loaded()</a>, <a class="el" href="group__album.html#ga46fbfa98be12c2f4067d5e679552cfb9">sp_album_is_loaded()</a>, and <a class="el" href="group__artist.html#gafc98f5093184a7ac7ce608302b0971ea">sp_artist_is_loaded()</a> functions will return non-zero for the objects contained in the search result.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">result</td><td>The same pointer returned by <a class="el" href="group__search.html#ga2f64dfbcc1313e7d5179998cb28208d4">sp_search_create()</a> </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">userdata</td><td>The opaque pointer given to <a class="el" href="group__search.html#ga2f64dfbcc1313e7d5179998cb28208d4">sp_search_create()</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gaff6bc550425d8ab963d93d7ed2e15bb5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__search.html#gaff6bc550425d8ab963d93d7ed2e15bb5">sp_search_add_ref</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Increase the reference count of a search result</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>The search result object </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga4ba7723e70db0c6a4569c4bcd44f0e98"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga6fd3e5de729c429fef3ff18ece6dcfad">sp_album</a>* <a class="el" href="group__search.html#ga4ba7723e70db0c6a4569c4bcd44f0e98">sp_search_album</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the album at the given index in the given search object</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>Index of the wanted album. Should be in the interval [0, <a class="el" href="group__search.html#ga0c456a6396c4c05fbc8677ea641ef1f7">sp_search_num_albums()</a> - 1]</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The album at the given index in the given search object </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="search_8c-example.html#a9">search.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga79b3d532d5a20a3b2bf2a087eead7888"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga31764fbd69618c10be173c6c03d4c1bc">sp_artist</a>* <a class="el" href="group__search.html#ga79b3d532d5a20a3b2bf2a087eead7888">sp_search_artist</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the artist at the given index in the given search object</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>Index of the wanted artist. Should be in the interval [0, <a class="el" href="group__search.html#gabd375a613c2dadecad8c13f8aca6f2d3">sp_search_num_artists()</a> - 1]</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The artist at the given index in the given search object </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="search_8c-example.html#a11">search.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga2f64dfbcc1313e7d5179998cb28208d4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a>* <a class="el" href="group__search.html#ga2f64dfbcc1313e7d5179998cb28208d4">sp_search_create</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>query</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>track_offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>track_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>album_offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>album_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>artist_offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>artist_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>playlist_offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>playlist_count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__session.html#ga99e8e9176ce40fff08a9be8b944edb09">sp_search_type</a>&#160;</td>
          <td class="paramname"><em>search_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__search.html#gabcd51c99a318b9f36dfe2948d8209bb1">search_complete_cb</a> *&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userdata</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create a search object from the given query</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>Session </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">query</td><td>Query search string, e.g. 'The Rolling Stones' or 'album:"The Black Album"' </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">track_offset</td><td>The offset among the tracks of the result </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">track_count</td><td>The number of tracks to ask for </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">album_offset</td><td>The offset among the albums of the result </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">album_count</td><td>The number of albums to ask for </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">artist_offset</td><td>The offset among the artists of the result </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">artist_count</td><td>The number of artists to ask for </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">playlist_offset</td><td>The offset among the playlists of the result </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">playlist_count</td><td>The number of playlists to ask for </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">search_type</td><td>Type of search, can be used for suggest searches </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>Callback that will be called once the search operation is complete. Pass NULL if you are not interested in this event. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">userdata</td><td>Opaque pointer passed to <code>callback</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Pointer to a search object. To free the object, use <a class="el" href="group__search.html#ga5a5bcc9cf18698774a099c3ce8cdab63">sp_search_release()</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="search_8c-example.html#a16">search.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga8561c1da8b93ecdc8f2d325a9d19199b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="group__search.html#ga8561c1da8b93ecdc8f2d325a9d19199b">sp_search_did_you_mean</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the "Did you mean" query for the given search object</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The "Did you mean" query for the given search object, or the empty string if no such info is available </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="search_8c-example.html#a4">search.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga7cf655e37a823f952d30270d4fb60f10"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__error.html#gafd27986ce4cd9eeaeca8adda83c9eb6b">sp_error</a> <a class="el" href="group__search.html#ga7cf655e37a823f952d30270d4fb60f10">sp_search_error</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if search returned an error code.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>One of the following errors, from <a class="el" href="group__error.html#ga83154178d3a32668658734d2facfa22b">sp_error</a> SP_ERROR_OK SP_ERROR_IS_LOADING SP_ERROR_OTHER_PERMANENT SP_ERROR_OTHER_TRANSIENT </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="search_8c-example.html#a12">search.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga70e8c404d8c7ce0bbef70c2b274417cd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="group__search.html#ga70e8c404d8c7ce0bbef70c2b274417cd">sp_search_is_loaded</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get load status for the specified search. Before it is loaded, it will behave as an empty search result.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if search is loaded, otherwise false </dd></dl>

</div>
</div>
<a class="anchor" id="ga0c456a6396c4c05fbc8677ea641ef1f7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="group__search.html#ga0c456a6396c4c05fbc8677ea641ef1f7">sp_search_num_albums</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the number of albums for the specified search</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of albums for the specified search </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="search_8c-example.html#a8">search.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="gabd375a613c2dadecad8c13f8aca6f2d3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="group__search.html#gabd375a613c2dadecad8c13f8aca6f2d3">sp_search_num_artists</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the number of artists for the specified search</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of artists for the specified search </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="search_8c-example.html#a10">search.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="gaa9f007f439d8241bf632f9abb8d926c9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="group__search.html#gaa9f007f439d8241bf632f9abb8d926c9">sp_search_num_playlists</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the number of playlists for the specified search</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of playlists for the specified search </dd></dl>

</div>
</div>
<a class="anchor" id="ga1dd18cf7b3b3b7f4bf6e92a2140378d0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="group__search.html#ga1dd18cf7b3b3b7f4bf6e92a2140378d0">sp_search_num_tracks</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the number of tracks for the specified search</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of tracks for the specified search </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="search_8c-example.html#a6">search.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="gac4463fab4ea25e0a5d5079c959a1781c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="group__search.html#gac4463fab4ea25e0a5d5079c959a1781c">sp_search_playlist_image_uri</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the image_uri of a playlist at the given index in the given search object</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>Index of the wanted playlist. Should be in the interval [0, <a class="el" href="group__search.html#gaa9f007f439d8241bf632f9abb8d926c9">sp_search_num_playlists()</a> - 1]</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The playlist image_uri at the given index in the given search object </dd></dl>

</div>
</div>
<a class="anchor" id="ga933cd5d5a0ccca9906082ca4549a4ed7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="group__search.html#ga933cd5d5a0ccca9906082ca4549a4ed7">sp_search_playlist_name</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the playlist at the given index in the given search object</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>Index of the wanted playlist. Should be in the interval [0, <a class="el" href="group__search.html#gaa9f007f439d8241bf632f9abb8d926c9">sp_search_num_playlists()</a> - 1]</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The playlist name at the given index in the given search object </dd></dl>

</div>
</div>
<a class="anchor" id="ga0071a3d30f0f0c4e477bf923e9014ff5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="group__search.html#ga0071a3d30f0f0c4e477bf923e9014ff5">sp_search_playlist_uri</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the uri of a playlist at the given index in the given search object</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>Index of the wanted playlist. Should be in the interval [0, <a class="el" href="group__search.html#gaa9f007f439d8241bf632f9abb8d926c9">sp_search_num_playlists()</a> - 1]</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The playlist uri at the given index in the given search object </dd></dl>

</div>
</div>
<a class="anchor" id="ga127e9c2bf98e3602ecfc2926b9d242bf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="group__search.html#ga127e9c2bf98e3602ecfc2926b9d242bf">sp_search_query</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the search query for the given search object</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The search query for the given search object </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="search_8c-example.html#a3">search.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga5a5bcc9cf18698774a099c3ce8cdab63"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__search.html#ga5a5bcc9cf18698774a099c3ce8cdab63">sp_search_release</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Decrease the reference count of a search result</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>The search result object </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="search_8c-example.html#a15">search.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="gaafd3b228adbc028937383d0d45730581"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="group__search.html#gaafd3b228adbc028937383d0d45730581">sp_search_total_albums</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the total number of albums for the search query - regardless of the interval requested at creation. If this value is larger than the interval specified at creation of the search object, more search results are available. To fetch these, create a new search object with a new interval.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The total number of albums matching the original query </dd></dl>

</div>
</div>
<a class="anchor" id="ga305a4118625e0f70cfb14161a0112fd5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="group__search.html#ga305a4118625e0f70cfb14161a0112fd5">sp_search_total_artists</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the total number of artists for the search query - regardless of the interval requested at creation. If this value is larger than the interval specified at creation of the search object, more search results are available. To fetch these, create a new search object with a new interval.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The total number of artists matching the original query </dd></dl>

</div>
</div>
<a class="anchor" id="ga2e286415a6ba8dbf85ea677906f2798c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="group__search.html#ga2e286415a6ba8dbf85ea677906f2798c">sp_search_total_playlists</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the total number of playlists for the search query - regardless of the interval requested at creation. If this value is larger than the interval specified at creation of the search object, more search results are available. To fetch these, create a new search object with a new interval.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The total number of playlists matching the original query </dd></dl>

</div>
</div>
<a class="anchor" id="gab4e50582c517b4639fd1afd6fb011587"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="group__search.html#gab4e50582c517b4639fd1afd6fb011587">sp_search_total_tracks</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the total number of tracks for the search query - regardless of the interval requested at creation. If this value is larger than the interval specified at creation of the search object, more search results are available. To fetch these, create a new search object with a new interval.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The total number of tracks matching the original query </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="search_8c-example.html#a5">search.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="gae9da7ca59ce0bbd73f7bcef4e15c4da8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a>* <a class="el" href="group__search.html#gae9da7ca59ce0bbd73f7bcef4e15c4da8">sp_search_track</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gac95893a6b23d4b19f6f149eed6ead1fd">sp_search</a> *&#160;</td>
          <td class="paramname"><em>search</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the track at the given index in the given search object</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">search</td><td>Search object </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>Index of the wanted track. Should be in the interval [0, <a class="el" href="group__search.html#ga1dd18cf7b3b3b7f4bf6e92a2140378d0">sp_search_num_tracks()</a> - 1]</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The track at the given index in the given search object </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="search_8c-example.html#a7">search.c</a>.</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<hr size="1"><address style="text-align: right;"><small>
Generated on Wed Mar 28 2012 18:24:10.<br>
Copyright &copy; 2006&ndash;2012 Spotify Ltd</small></address>
</body>
</html>
